<template>
  <div id="">
    <el-breadcrumb separator-class="el-icon-arrow-right" style="margin-bottom: 10px">
      <el-breadcrumb-item to="/Home">首页</el-breadcrumb-item>
      <el-breadcrumb-item>数据统计</el-breadcrumb-item>
      <el-breadcrumb-item>数据报表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card">
      <div id="myChart" :style="{width: '750px', height: '400px'}"></div>
    </el-card>
  </div>
</template>
<script>
import {ShuJuBaoBiao} from '@/utils/api'
import  _ from 'lodash'
export default {
  name: 'FuncFormsBase',
  props: {},
  data() {
    return {
      data: {}
    };
  },
  // 子组件转换
  components: {},
  // 数据引入 created
  created() {
  },
  mounted() {
    this.drawLine();
    this.BaoBiao()
  },
  //点击函数事件
  methods: {
    drawLine() {
      // var echarts = require('echarts');
      // var myChart = echarts.init(document.getElementById('myChart'));
      //
      // myChart.setOption({});
    },
    async BaoBiao() {
      var echarts = require('echarts');
      var myChart = echarts.init(document.getElementById('myChart'));
      const res = JSON.stringify(await ShuJuBaoBiao())
      console.log(res)
      myChart.setOption({res})
      // let{legend,series,xAxis,yAxis} = res
      // this.data = res
      // console.log(legend.data,series)
      // console.log(xAxis,yAxis)
    }
  },
//计算事件
  computed: {},
//数据监听
  watch: {},
//过滤器
  filters: {},
//设定自定义指令
  directives: {},
}
</script>
<style lang="scss" scoped>
</style>